import { reactive, watch } from 'vue';

export default function importConfig(props, { emit }) {
  const base = reactive<any>({
    commitOption: null,
  });

  const init = () => {
    propsOption();
    viewDetaOption();
  };

  const propsOption = () => {
    base.commitOption = props.gathering;
  };

  const search = () => {
    // console.log('搜索');
  };

  const reset = () => {
    // console.log('重置');
  };

  /**
   * @exports viewDetaOption 数据监听
   */
  const viewDetaOption = () => {
    watch(base.commitOption, () => {
      console.log(base.commitOption);
    });
  };

  return {
    search,
    reset,
    init,
  };
}
